package com.whmall.service.crm.provider;

import com.whmall.component.entity.dto.OperatorReqDTO;
import com.whmall.service.crm.api.SupplierChemicalCraftApi;
import com.whmall.service.crm.entity.dto.supplierchemical.*;
import org.apache.dubbo.config.annotation.DubboService;
import com.whmall.service.crm.module.supplierchemical.service.SupplierChemicalCraftService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService(interfaceClass = SupplierChemicalCraftApi.class)
public class SupplierChemicalCraftProvider implements SupplierChemicalCraftApi{

    @Autowired
    private SupplierChemicalCraftService supplierChemicalCraftService;

    @Override
    public void save(SupplierChemicalCraftAddReqDTO reqDTO, OperatorReqDTO operatorReqDTO) {
        supplierChemicalCraftService.save(reqDTO,operatorReqDTO);
    }

    @Override
    public void removeById(Long id, OperatorReqDTO operatorReqDTO) {
        supplierChemicalCraftService.removeById(id,operatorReqDTO);
    }

    @Override
    public void update(SupplierChemicalCraftUpdateDTO reqDTO, OperatorReqDTO operatorReqDTO) {
        supplierChemicalCraftService.update(reqDTO,operatorReqDTO);
    }

    @Override
    public List<SupplierChemicalCraftRspDTO> listBy(SupplierChemicalCraftQueryDTO query) {
        return supplierChemicalCraftService.listBy(query);
    }

    @Override
    public List<SupplierChemicalCraftAttachmentRspDTO> listAttachmentByCraftId(Long craftId) {
        return supplierChemicalCraftService.listAttachmentByCraftId(craftId);
    }
}